extends Node2D
class_name PlayerHp

@onready var numberTexture:Array[Node] = $HBoxContainer/numbers.get_children()

func updateScore(num:int):
	if num >= len(numberTexture):
		return
	var scoreTexture:TextureRect = (numberTexture[num] as TextureRect)
	$HBoxContainer/score.texture = scoreTexture.texture

